package com.xinnet.mms.quartz.dao.impl;

import java.sql.SQLException;

import org.springframework.stereotype.Repository;

import com.xinnet.core.dao.impl.BaseDaoImpl;
import com.xinnet.mms.entity.Customer;
import com.xinnet.mms.quartz.dao.JobTimeDao;

@Repository("jobTimeDao")
public class JobTimeDaoImpl extends BaseDaoImpl<Object, Object> implements JobTimeDao {

	/**
	 * 修改时间戳
	 */
	@Override
	public void updateJobTime(Customer customer) throws SQLException {
		this.getSqlSession().update("quartz.updateJobTime",customer);
	}

	/**
	 * 获取时间戳
	 */
	@Override
	public Customer getJobTime(String jobType) throws SQLException {
		return this.getSqlSession().selectOne("quartz.getJobTime",jobType);
	}

	/**
	 * 添加时间戳
	 */
	@Override
	public void addJobTime(Customer customer) throws SQLException {
		this.getSqlSession().insert("quartz.addJobTime",customer);
	}
	
}
